Integrand size = 31, antiderivative size = 90 \[ \int \frac {\cos (c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^2} \, dx=-\frac {2 C x}{a^2}+\frac {(A+4 C) \sin (c+d x)}{3 a^2 d}+\frac {2 C \sin (c+d x)}{a^2 d (1+\cos (c+d x))}-\frac {(A+C) \cos ^2(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2} \]
[Out]
Time = 0.28 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {3121, 3047, 3102, 12, 2814, 2727} \[ \int \frac {\cos (c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^2} \, dx=\frac {(A+4 C) \sin (c+d x)}{3 a^2 d}+\frac {2 C \sin (c+d x)}{a^2 d (\cos (c+d x)+1)}-\frac {2 C x}{a^2}-\frac {(A+C) \sin (c+d x) \cos ^2(c+d x)}{3 d (a \cos (c+d x)+a)^2} \]
[In]
[Out]
Rule 12
Rule 2727
Rule 2814
Rule 3047
Rule 3102
Rule 3121
Rubi steps \begin{align*} \text {integral}& = -\frac {(A+C) \cos ^2(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}+\frac {\int \frac {\cos (c+d x) (a (A-2 C)+a (A+4 C) \cos (c+d x))}{a+a \cos (c+d x)} \, dx}{3 a^2} \\ & = -\frac {(A+C) \cos ^2(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}+\frac {\int \frac {a (A-2 C) \cos (c+d x)+a (A+4 C) \cos ^2(c+d x)}{a+a \cos (c+d x)} \, dx}{3 a^2} \\ & = \frac {(A+4 C) \sin (c+d x)}{3 a^2 d}-\frac {(A+C) \cos ^2(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}+\frac {\int -\frac {6 a^2 C \cos (c+d x)}{a+a \cos (c+d x)} \, dx}{3 a^3} \\ & = \frac {(A+4 C) \sin (c+d x)}{3 a^2 d}-\frac {(A+C) \cos ^2(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}-\frac {(2 C) \int \frac {\cos (c+d x)}{a+a \cos (c+d x)} \, dx}{a} \\ & = -\frac {2 C x}{a^2}+\frac {(A+4 C) \sin (c+d x)}{3 a^2 d}-\frac {(A+C) \cos ^2(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}+\frac {(2 C) \int \frac {1}{a+a \cos (c+d x)} \, dx}{a} \\ & = -\frac {2 C x}{a^2}+\frac {(A+4 C) \sin (c+d x)}{3 a^2 d}-\frac {(A+C) \cos ^2(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}+\frac {2 C \sin (c+d x)}{d \left (a^2+a^2 \cos (c+d x)\right )} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(195\) vs. \(2(90)=180\).
Time = 1.04 (sec) , antiderivative size = 195, normalized size of antiderivative = 2.17 \[ \int \frac {\cos (c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^2} \, dx=\frac {\sec \left (\frac {c}{2}\right ) \sec ^3\left (\frac {1}{2} (c+d x)\right ) \left (-36 C d x \cos \left (\frac {d x}{2}\right )-36 C d x \cos \left (c+\frac {d x}{2}\right )-12 C d x \cos \left (c+\frac {3 d x}{2}\right )-12 C d x \cos \left (2 c+\frac {3 d x}{2}\right )+12 A \sin \left (\frac {d x}{2}\right )+66 C \sin \left (\frac {d x}{2}\right )-12 A \sin \left (c+\frac {d x}{2}\right )-30 C \sin \left (c+\frac {d x}{2}\right )+8 A \sin \left (c+\frac {3 d x}{2}\right )+41 C \sin \left (c+\frac {3 d x}{2}\right )+9 C \sin \left (2 c+\frac {3 d x}{2}\right )+3 C \sin \left (2 c+\frac {5 d x}{2}\right )+3 C \sin \left (3 c+\frac {5 d x}{2}\right )\right )}{48 a^2 d} \]
[In]
[Out]
Time = 1.96 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.77
method | result | size |
parallelrisch | \(\frac {\left (\left (28 C \cos \left (d x +c \right )+3 C \cos \left (2 d x +2 c \right )-2 A +23 C \right ) \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+8 A \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-24 d x C}{12 a^{2} d}\) | \(69\) |
derivativedivides | \(\frac {-\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A}{3}-\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{3}+A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C -4 C \left (-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}+2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}{2 d \,a^{2}}\) | \(103\) |
default | \(\frac {-\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A}{3}-\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{3}+A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C -4 C \left (-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}+2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}{2 d \,a^{2}}\) | \(103\) |
risch | \(-\frac {2 C x}{a^{2}}-\frac {i {\mathrm e}^{i \left (d x +c \right )} C}{2 a^{2} d}+\frac {i {\mathrm e}^{-i \left (d x +c \right )} C}{2 a^{2} d}+\frac {2 i \left (3 A \,{\mathrm e}^{2 i \left (d x +c \right )}+9 C \,{\mathrm e}^{2 i \left (d x +c \right )}+3 A \,{\mathrm e}^{i \left (d x +c \right )}+15 C \,{\mathrm e}^{i \left (d x +c \right )}+2 A +8 C \right )}{3 d \,a^{2} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{3}}\) | \(124\) |
norman | \(\frac {\frac {\left (A +9 C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {2 C x}{a}+\frac {2 C \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {6 C x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {6 C x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {2 C x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {\left (A +C \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a d}+\frac {\left (A +9 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a d}+\frac {2 \left (2 A +17 C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3} a}\) | \(195\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.13 \[ \int \frac {\cos (c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^2} \, dx=-\frac {6 \, C d x \cos \left (d x + c\right )^{2} + 12 \, C d x \cos \left (d x + c\right ) + 6 \, C d x - {\left (3 \, C \cos \left (d x + c\right )^{2} + 2 \, {\left (A + 7 \, C\right )} \cos \left (d x + c\right ) + A + 10 \, C\right )} \sin \left (d x + c\right )}{3 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} + 2 \, a^{2} d \cos \left (d x + c\right ) + a^{2} d\right )}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 335 vs. \(2 (87) = 174\).
Time = 1.03 (sec) , antiderivative size = 335, normalized size of antiderivative = 3.72 \[ \int \frac {\cos (c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^2} \, dx=\begin {cases} - \frac {A \tan ^{5}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} + \frac {2 A \tan ^{3}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} + \frac {3 A \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} - \frac {12 C d x \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} - \frac {12 C d x}{6 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} - \frac {C \tan ^{5}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} + \frac {14 C \tan ^{3}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} + \frac {27 C \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{2} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 6 a^{2} d} & \text {for}\: d \neq 0 \\\frac {x \left (A + C \cos ^{2}{\left (c \right )}\right ) \cos {\left (c \right )}}{\left (a \cos {\left (c \right )} + a\right )^{2}} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.83 \[ \int \frac {\cos (c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^2} \, dx=\frac {C {\left (\frac {\frac {15 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {24 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} + \frac {12 \, \sin \left (d x + c\right )}{{\left (a^{2} + \frac {a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}}\right )} + \frac {A {\left (\frac {3 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{a^{2}}}{6 \, d} \]
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.27 \[ \int \frac {\cos (c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^2} \, dx=-\frac {\frac {12 \, {\left (d x + c\right )} C}{a^{2}} - \frac {12 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )} a^{2}} + \frac {A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + C a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 3 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 15 \, C a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{6}}}{6 \, d} \]
[In]
[Out]
Time = 1.03 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.08 \[ \int \frac {\cos (c+d x) \left (A+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^2} \, dx=\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {A+C}{a^2}-\frac {A-3\,C}{2\,a^2}\right )}{d}-\frac {2\,C\,x}{a^2}+\frac {2\,C\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^2\right )}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (A+C\right )}{6\,a^2\,d} \]
[In]
[Out]